<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="vue.js"></script>
    <link rel="stylesheet" href="animate.css">
    <style>
       .tr-enter,.tr-leave-to{opacity:0}
       .tr-enter-to,.tr-leave{opacity:1}
        </style>
</head>

<body>
    <div id="app">
        <button @click="show=true">出现<button>
        <button @click="show=false">消失<button>
        <transition name="tr" enter-active-class="animated hinge" 
            leave-active-class="animated swing">
        <div id="box" v-show="show" >vue动画</div>
        </transition>
      </div>
      
      <script>
        var vm=new Vue({
            el:"#app",
            data:{
                show:true
            }
        })
      </script>
  
</body>

<html>
